package com.springboot.demo.design.pattern.observer;

import java.util.Observable;

/**
 * 被观察者
 *
 * @author supu
 * @date 2019-07-17 13:39
 **/
public class Observed extends Observable {
    /**
     * 接收消息
     *
     * @param object
     */
    void receiveMessage(Object object) {
        setChanged();
        notifyObservers(object);
    }
}
